package com.example.mobile2032021606168xmy0616classtext;

import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

public class MainActivity extends AppCompatActivity {

    private RecyclerView rvMainPeople;
    private TextView tvMainTitle;
    private String[] names = {"崔胜贤", "东永裴", "姜大成", "权志龙", "李胜利", "金敏锡", "鹿晗", "吴亦凡", "金俊勉", "张艺兴", "朴灿烈", "金钟大", "边伯贤", "都暻秀",
            "黄子韬", "金钟仁", "吴世勋", "龚俊", "张哲瀚", "杨幂", "林允儿", "李易峰", "张根硕", "李弘基"};


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        rvMainPeople.setLayoutManager(new LinearLayoutManager(this));
        PeopleAdapter adapter = new PeopleAdapter(names);
        rvMainPeople.setAdapter(adapter);

    }

    private void initView() {
        rvMainPeople = (RecyclerView) findViewById(R.id.rv_main_people);
        tvMainTitle = (TextView) findViewById(R.id.tv_main_title);
    }


}